﻿#ifndef PERSONINFOUI_H
#define PERSONINFOUI_H
#pragma once
#include <QWidget>
#include <QMouseEvent>

namespace Ui {
class PersonInfoUI;
}

class PersonInfoUI : public QWidget
{
    Q_OBJECT

public:
    explicit PersonInfoUI(QWidget *parent = nullptr);
    PersonInfoUI();
    PersonInfoUI(const PersonInfoUI& p);
    ~PersonInfoUI();
    void mousePressEvent(QMouseEvent *event);//鼠标点击
    void mouseMoveEvent(QMouseEvent *event);//鼠标移动
    void mouseReleaseEvent(QMouseEvent *event);//鼠标释放
    void initUserInfo(QString name);
    void hideEditInofoBtn();
private slots:
    void on_btn_close_clicked();

    void on_btn_min_clicked();

    void on_btn_editinfo_clicked();

    void on_label_head_clicked();

private:
    Ui::PersonInfoUI *ui;
    bool isPressedWidget;//isPressedWidget和last用来控制窗口移动
    QPoint last;
    bool controlshow;
};

#endif // PERSONINFOUI_H
